package com.weishe.weichar;

import java.io.IOException;

import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

public class WeatherReducer extends Reducer<Weather, Text, Text, NullWritable> {

	@Override
	protected void reduce(Weather key, Iterable<Text> values, Context context)
			throws IOException, InterruptedException {
		int count = 0;
		for (Text t : values) {
			if(count>=10){
				break;
			}
			context.write(t, NullWritable.get());
		}

	}

}
